package cn.sherer.beans.douyin;

import java.util.List;
import java.util.ArrayList;
import java.io.Serializable;
import cn.sherer.utils.StringUtils;

/**
 * 抖音订单消息
 */
public class DyOrderMsg implements Serializable {
    private String appid;
    private String app_id;
    private String cp_orderno;
    private String out_order_no;
    private String cp_extra;
    private String way;
    private String pay_status;
    private int pay_channel;
    private String channel_no;
    private String channel_pay_id;
    private String channel_gateway_no;
    private String payment_order_no;
    private String out_channel_order_no;
    private List<DyOrderItemDetail> item_order_list;
    private long total_amount;
    private String status;
    private String item_id;
    private String seller_uid;
    private String merchant_uid;
    private String extra;
    private long paid_at;
    private long pay_time;
    private long event_time;
    private long trade_time;
    private String message;
    private String order_id;
    private String refund_id;
    private DyRefundItemDetail refund_item_detail;
    private String out_refund_no;
    private long refund_total_amount;
    private boolean is_all_settled;
    private String refund_type;
    private String ec_pay_trade_no;
    private long discount_amount;
    private String user_bill_pay_id;

    public DyOrderMsg() {
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
        this.app_id = appid;
    }

    public String getApp_id() {
        return app_id;
    }

    public void setApp_id(String app_id) {
        this.appid = app_id;
        this.app_id = app_id;
    }

    public String getCp_orderno() {
        return cp_orderno;
    }

    public void setCp_orderno(String cp_orderno) {
        this.cp_orderno = cp_orderno;
        this.out_order_no = cp_orderno;
    }

    public String getOut_order_no() {
        return out_order_no;
    }

    public void setOut_order_no(String out_order_no) {
        this.cp_orderno = out_order_no;
        this.out_order_no = out_order_no;
    }

    public String getCp_extra() {
        return cp_extra;
    }

    public void setCp_extra(String cp_extra) {
        this.cp_extra = cp_extra;
    }

    public String getWay() {
        return way;
    }

    public void setWay(String way) {
        this.way = way;
        this.pay_channel = StringUtils.toInt(way);
    }

    public void setWay(int way) {
        this.way = String.valueOf(way);
        this.pay_channel = way;
    }

    public String getPay_status() {
        return pay_status;
    }

    public void setPay_status(String pay_status) {
        this.pay_status = pay_status;
    }

    public int getPay_channel() {
        return pay_channel;
    }

    public void setPay_channel(String pay_channel) {
        this.way = pay_channel;
        this.pay_channel = StringUtils.toInt(pay_channel);
    }

    public void setPay_channel(int pay_channel) {
        this.way = String.valueOf(pay_channel);
        this.pay_channel = pay_channel;
    }

    public String getChannel_no() {
        return channel_no;
    }

    public void setChannel_no(String channel_no) {
        this.channel_no = channel_no;
        this.channel_pay_id = channel_no;
    }

    public String getChannel_pay_id() {
        return channel_pay_id;
    }

    public void setChannel_pay_id(String channel_pay_id) {
        this.channel_no = channel_pay_id;
        this.channel_pay_id = channel_pay_id;
    }

    public String getChannel_gateway_no() {
        return channel_gateway_no;
    }

    public void setChannel_gateway_no(String channel_gateway_no) {
        this.channel_gateway_no = channel_gateway_no;
    }

    public String getPayment_order_no() {
        return payment_order_no;
    }

    public void setPayment_order_no(String payment_order_no) {
        this.payment_order_no = payment_order_no;
    }

    public String getOut_channel_order_no() {
        return out_channel_order_no;
    }

    public void setOut_channel_order_no(String out_channel_order_no) {
        this.out_channel_order_no = out_channel_order_no;
    }

    public List<DyOrderItemDetail> getItem_order_list() {
        return item_order_list == null ? new ArrayList<>() : item_order_list;
    }

    public void setItem_order_list(List<DyOrderItemDetail> item_order_list) {
        this.item_order_list = item_order_list;
    }

    public long getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(long total_amount) {
        this.total_amount = total_amount;
    }

    public void setTotal_amount(String total_amount) {
        this.total_amount = Long.parseLong(total_amount);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getItem_id() {
        return item_id;
    }

    public void setItem_id(String item_id) {
        this.item_id = item_id;
    }

    public String getSeller_uid() {
        return seller_uid;
    }

    public void setSeller_uid(String seller_uid) {
        this.seller_uid = seller_uid;
        this.merchant_uid = seller_uid;
    }

    public String getMerchant_uid() {
        return merchant_uid;
    }

    public void setMerchant_uid(String merchant_uid) {
        this.seller_uid = merchant_uid;
        this.merchant_uid = merchant_uid;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public long getPaid_at() {
        return paid_at;
    }

    public void setPaid_at(long paid_at) {
        this.paid_at = paid_at;
        this.event_time = paid_at;
    }

    public void setPaid_at(String paid_at) {
        this.paid_at = Long.parseLong(paid_at);
        this.event_time = this.paid_at;
    }

    public long getPay_time() {
        return pay_time;
    }

    public void setPay_time(long pay_time) {
        this.pay_time = pay_time;
    }

    public long getEvent_time() {
        return event_time;
    }

    public void setEvent_time(long event_time) {
        this.paid_at = event_time;
        this.event_time = event_time;
    }

    public void setEvent_time(String event_time) {
        this.paid_at = Long.parseLong(event_time);
        this.event_time = this.paid_at;
    }

    public long getTrade_time() {
        return trade_time;
    }

    public void setTrade_time(long trade_time) {
        this.trade_time = trade_time;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }

    public String getRefund_id() {
        return refund_id;
    }

    public void setRefund_id(String refund_id) {
        this.refund_id = refund_id;
    }

    public DyRefundItemDetail getRefund_item_detail() {
        return refund_item_detail == null ? new DyRefundItemDetail() : refund_item_detail;
    }

    public void setRefund_item_detail(DyRefundItemDetail refund_item_detail) {
        this.refund_item_detail = refund_item_detail;
    }

    public String getOut_refund_no() {
        return out_refund_no;
    }

    public void setOut_refund_no(String out_refund_no) {
        this.out_refund_no = out_refund_no;
    }

    public long getRefund_total_amount() {
        return refund_total_amount;
    }

    public void setRefund_total_amount(long refund_total_amount) {
        this.refund_total_amount = refund_total_amount;
    }

    public boolean isIs_all_settled() {
        return is_all_settled;
    }

    public void setIs_all_settled(boolean is_all_settled) {
        this.is_all_settled = is_all_settled;
    }

    public String getRefund_type() {
        return refund_type;
    }

    public void setRefund_type(String refund_type) {
        this.refund_type = refund_type;
    }

    public String getEc_pay_trade_no() {
        return ec_pay_trade_no;
    }

    public void setEc_pay_trade_no(String ec_pay_trade_no) {
        this.ec_pay_trade_no = ec_pay_trade_no;
    }

    public long getDiscount_amount() {
        return discount_amount;
    }

    public void setDiscount_amount(long discount_amount) {
        this.discount_amount = discount_amount;
    }

    public String getUser_bill_pay_id() {
        return user_bill_pay_id;
    }

    public void setUser_bill_pay_id(String user_bill_pay_id) {
        this.user_bill_pay_id = user_bill_pay_id;
    }

    @Override
    public String toString() {
        return "DyOrderMsg{" + "appid=" + appid + ", app_id=" + app_id + ", cp_orderno=" + cp_orderno + ", out_order_no=" + out_order_no + ", cp_extra=" + cp_extra + ", way=" + way + ", pay_status=" + pay_status + ", pay_channel=" + pay_channel + ", channel_no=" + channel_no + ", channel_pay_id=" + channel_pay_id + ", channel_gateway_no=" + channel_gateway_no + ", payment_order_no=" + payment_order_no + ", out_channel_order_no=" + out_channel_order_no + ", item_order_list=" + item_order_list + ", total_amount=" + total_amount + ", status=" + status + ", item_id=" + item_id + ", seller_uid=" + seller_uid + ", merchant_uid=" + merchant_uid + ", extra=" + extra + ", paid_at=" + paid_at + ", pay_time=" + pay_time + ", event_time=" + event_time + ", trade_time=" + trade_time + ", message=" + message + ", order_id=" + order_id + ", refund_id=" + refund_id + ", refund_item_detail=" + refund_item_detail + ", out_refund_no=" + out_refund_no + ", refund_total_amount=" + refund_total_amount + ", is_all_settled=" + is_all_settled + ", refund_type=" + refund_type + ", ec_pay_trade_no=" + ec_pay_trade_no + ", discount_amount=" + discount_amount + ", user_bill_pay_id=" + user_bill_pay_id + '}';
    }
}
